/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.fiap.servlet;

import br.com.fiap.codigo.Console;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *
 * @author rm64596
 */

@WebServlet(urlPatterns="/processarLogin")

public class ProcessarLogin extends HttpServlet {

    String usuario;
    String pwd;
    
    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        
        PrintWriter writer = resp.getWriter();
        
        // req = tudo que vc quer receber ; resp = tudo que vc quer responder
        
        usuario = req.getParameter("nomeUsuario");
        
        pwd = req.getParameter("senha");
             
        writer.println("Usuario Solicitado: " + usuario);
        writer.println("Senha do usuario Solicitado: " + pwd);
          
        
    }
    
    
    
}
